select * FROM JDEFAAssetAccountBalancesFile
where assetitemnumber = 38161
and objectaccount = 1757 

use RD_DWCR;
select assetitemnumber, objectaccount, subsidiary, prioryearclosebalance  from JDEFAAssetAccountBalancesFile
where assetitemnumber in (38161, 51195, 66291, 68934,70188,83458, 85922, 86314, 88045, 88322, 89453, 94000, 116747, 
122141, 122248,123178, 123709, 132434, 133119, 134782, 134865,137124,148060, 151201, 151926, 154872 , 169910, 
168497, 167705, 167704, 166385, 166134, 166133, 166075, 164699)
and objectaccount = 1757 
order by AssetItemNumber, ObjectAccount, Subsidiary DESC




use RD_ARMART;

select top 100  BatchDateID,company,DocumentNumber, DocumentType, GLDATEID, InvoiceDateID from dbo.AR_Star_Facts
where SalesDocumentNumber=51556125


use RD_ARMART;

select Top 20 BatchDateID, company,DocumentNumber, DocumentType, GLDATEID, INvoiceDateID from dbo.AR_Star_Facts
where batchdateid = '2010050101000'


Use MicroStrategy_Views;

select * from Sales_Star_BatchDateID 

